﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_kcgl_dykcmt : System.Web.UI.Page
{
    DataClassesDataContext db = new DataClassesDataContext();
    protected void Page_Load(object sender, EventArgs e)
    {
        BindData();
    }
    private void BindData()
    {
        int SubjectNo = Convert.ToInt32(Request.QueryString["subjectNo"].ToString());
        string ClassNo = Request.QueryString["classNo"].ToString();
        var resultYear = (from p in db.proc_GetBkgxNowYear()
                          select p).ToList().First();
        Label3.Text = resultYear.schoolName;
        Label4.Text = resultYear.dYear;
        Label5.Text = ClassNo;
        Label6.Text = (from p in db.examPlace
                         where p.classNo == ClassNo
                         select p.place).ToList().First();
        Label7.Text = (from p in db.TestDate
                            where p.subjectNo == SubjectNo
                            select p.testTime).ToList().First();

        var MaxMinZkzh = from p in db.proc_GetExamMaxMinZkzhByClassNoSubjectNo(SubjectNo, ClassNo)
                         select p;
        DataList1. DataSource = MaxMinZkzh;
        DataList1.DataBind();
    }
}